//
//  LBGorenjeCell.m
//  loveBeen
//
//  Created by 李田 on 16/11/20.
//  Copyright © 2016年 loveBeen. All rights reserved.
//

#import "LBGorenjeCell.h"
#import "LBImgModel.h"
@interface LBGorenjeCell ()

@property(nonatomic, weak)UIImageView *titleImageV;
@end
@implementation LBGorenjeCell

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        
        [self setupUI];
    }
    return self;
}

- (void)setImgModel:(LBImgModel *)imgModel{
    
    _imgModel = imgModel;
    
    [self.titleImageV sd_setImageWithURL:[NSURL URLWithString:imgModel.img]];
}

#pragma mark - 搭建界面
- (void)setupUI{
    
    self.backgroundColor = [UIColor whiteColor];
    
    UIImageView *titleImgV = [[UIImageView alloc] init];
    
    [titleImgV sd_setImageWithURL:[NSURL URLWithString:@"http://img01.bqstatic.com//upload/activity/2016102010483026.jpg@90Q.jpg"]];
    [self.contentView addSubview: titleImgV];
    self.titleImageV = titleImgV;
    
    [titleImgV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView);
    }];
   }
@end
